<?php
/**
 * Update/Build a Campain
 * 
 */

use Fox\Html\Block;
use Fox\Html\Screen;
$xview = Xview::instance();

$campain = $xview->component('campains','object',array('campainid' => $xview->val('campainid')));
$data = $campain->getData();

$screen = new Screen('sHeader','update');
// Header Data
$blHeader = $xview->component("campains","header");
$screen->add($blHeader);
// Contact List
$blContacts  = new Block("bContacts","Contacts");
$gContacts = $xview->component("campains","contacts");
$blContacts->add($gContacts);
$screen->add($blContacts);

$screen->initialize($data);

if($screen->submitted()) {
	
	$fields = $screen->get();
	if(!$screen->errors()) {
		
	}
}
echo $screen->display();